var dialogManager = require("dialogManager");
cc.Class({
    extends: cc.Component,

    properties: {
        img_pet : {
            default : null,
            type : cc.Node
        },
        txt_name : {
            default : null,
            type : cc.Label
        },
        txt_lv : {
            default : null,
            type : cc.Label
        },
        txt_gold : {
            default : null,
            type : cc.Label
        },
        txt_hit : {
            default : null,
            type : cc.Label
        },
        sprArr :{
            default:[],
            type:[cc.SpriteFrame],
        },
    },
    onLoad () {},
    start () {
    },
    show(index,lv){
        // this.img_pet.getComponent(cc.Sprite).spriteFrame = this.sprArr[index];
        // this.txt_name.string = name;
        this.txt_lv.string = lv;
        var hit = index*50*lv;
        var gold = hit*2;
        this.txt_hit.string = hit;
        this.txt_gold.string = gold;
    },
    shenjiClick(){
        cc.vv.audioMgr.playSFX("ui_button");
        // dialogManager.showShiPinDialog();
    },
    chuzhanClick(){
        cc.vv.audioMgr.playSFX("ui_button");
    },
});
